<html>
<head><meta charset="utf-8"><title>Speeding up get_blanket_impls · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html">Speeding up get_blanket_impls</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220074373"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220074373" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220074373">(Dec 16 2020 at 03:47)</a>:</h4>
<p>So it turns out that rustdoc spends an absolutely inordinate amount of time on <code>get_blanket_impls</code> for stm32 crates <a href="https://github.com/rust-lang/rust/issues/79103#issuecomment-745737864">https://github.com/rust-lang/rust/issues/79103#issuecomment-745737864</a></p>



<a name="220074388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220074388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220074388">(Dec 16 2020 at 03:47)</a>:</h4>
<p><span class="user-mention" data-user-id="216206">@lcnr</span> is there something obvious I can do to make this code faster? <a href="https://github.com/rust-lang/rust/blob/c00a4648a4cab9659a5712af457d07d42178c5e0/src/librustdoc/clean/blanket_impl.rs#L23">https://github.com/rust-lang/rust/blob/c00a4648a4cab9659a5712af457d07d42178c5e0/src/librustdoc/clean/blanket_impl.rs#L23</a></p>



<a name="220074440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220074440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220074440">(Dec 16 2020 at 03:48)</a>:</h4>
<p>hmm, maybe I could turn <code>may_apply</code> into a query?</p>



<a name="220074445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220074445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220074445">(Dec 16 2020 at 03:48)</a>:</h4>
<p>not sure if that's ever called with the same impl twice though - I don't think I'd expect it to be</p>



<a name="220085625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220085625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220085625">(Dec 16 2020 at 07:46)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/c00a4648a4cab9659a5712af457d07d42178c5e0/src/librustdoc/clean/blanket_impl.rs#L74">https://github.com/rust-lang/rust/blob/c00a4648a4cab9659a5712af457d07d42178c5e0/src/librustdoc/clean/blanket_impl.rs#L74</a></p>



<a name="220085643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220085643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220085643">(Dec 16 2020 at 07:46)</a>:</h4>
<p>would be interested in the logs of that</p>



<a name="220085754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220085754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220085754">(Dec 16 2020 at 07:48)</a>:</h4>
<p>ah, so the param env is the only think that changes between items here</p>



<a name="220086036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220086036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220086036">(Dec 16 2020 at 07:54)</a>:</h4>
<p>(and the value of <code>T</code> in an <code>impl&lt;T&gt; Foo for T</code>)</p>



<a name="220086146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Speeding%20up%20get_blanket_impls/near/220086146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Speeding.20up.20get_blanket_impls.html#220086146">(Dec 16 2020 at 07:56)</a>:</h4>
<p>so I don't see anything trivial to throw out here</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>